{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{include file="public/_validform"}
<!--上传配置 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>
<!--验证-->
<script type="text/javascript">
    upload_image('image','','','','500');
    var URL = {
        uploader: '{:url('Upload/image')}',
        swf:'__STATIC__/admin/uploadify/uploadify.swf',
        ROOT:'__PUBLIC__/uploads/image',
        del_url:'{:url('Product/delimage')}',
    }
</script>
{/block}

{block name="main"}

<div class="page-container">

    <form action="" method="post" class="form form-horizontal" id="form">
        
        <table class="table table-border table-bordered table-bg table-style">
            <thead>
                <tr>
                    <th colspan="2" scope="col">填写信息</th>
                </tr>
            </thead>
            
            <tbody>
                <tr>
                    <th>
                        <span class="c-red">*</span>标题：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.title ?? ''}" placeholder="" id="title" datatype="*" name="title">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        图片：
                    </th>
                    <td>
                        <div id="image_s">
                            {notempty name="$data.image"}
                            <img src="__PUBLIC__/uploads/{$data.image ?'image/'.$data.image: 'sm_125.jpg'}" />
                            {/notempty}
                        </div>
                        <input id="image_post" name="image" type="hidden" value="{$data.image ?? ''}"/>
                        <input name="old_image" type="hidden" value="{$data.image ?? ''}"/>
                        <input id="image" name="image_upload" type="file" multiple="true">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        <span class="c-red">*</span>链接地址：
                    </th>
                    <td>
                        <input type="url" class="input-text" value="{$data.url ?? ''}" placeholder="http://localhost/" id="url" datatype="url" name="url">
                    </td>
                </tr>
                
            </tbody>
            
            <tfoot>
                <tr>
                    <th></th>
                    <td>
                        {:token()}
                        <input name="position" value="{$Request.param.position ?? ''}" type="hidden" />

                        <input class="btn radius btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                        <input class="btn radius btn-default radius" type="reset" value="&nbsp;&nbsp;重置&nbsp;&nbsp;">

                        <!-- <button onClick="layer_close();" class="btn radius btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button> -->
                    </td>
                </tr>
            </tfoot>
            
        </table>

    </form>
    
</div>
{/block}
